MSVC Builds: Create libgtk3.manifest
authorChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 6 Aug 2014 07:42:23 +0000 (15:42 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 6 Aug 2014 07:42:23 +0000 (15:42 +0800)
Use the Python script that was used to create gtk-win32.rc from
gtk-win32.rc.in to similarly create libgtk3.manifest.  As the wildcard
character can be used for all architectures, use that.

The libgtk3.manifest file needs to be specified explicitly in the projects,
so that it will be recognized and built into the GTK dll, so update the
project files as well on this part.

https://bugzilla.gnome.org/show_bug.cgi?id=733773

build/win32/process-in-win32.py
build/win32/vs10/gtk-gen-srcs.props
build/win32/vs10/gtk.vcxproj.filtersin
build/win32/vs10/gtk.vcxprojin
build/win32/vs9/gtk-gen-srcs.vsprops
build/win32/vs9/gtk.vcprojin

index 00c4c01938081c83c01147650d8c075ca14d12b5..ca5c80ad48d66045fd239932624ae10a2c1759a4 100644 (file)
@@ -69,7 +69,7 @@ def main(argv):
 
     parser.add_argument('--gtk3manifest', dest='gtk3manifest', action='store_const',
                    const=1,
-                   help='Generate libgtk3.manifest (Not used now)')
+                   help='Generate libgtk3.manifest')
 
     args = parser.parse_args()
     no_args = True
@@ -85,12 +85,11 @@ def main(argv):
         no_args = False
 
     if args.gtk3manifest is not None:
-        print('Not Used... Will add once gtk/libgtk3.manifest.in is added')
-        #manifest = {}
-        #manifest['EXE_MANIFEST_ARCHITECTURE'] = '*'
-        #process_in(os.path.join(srcroot, 'gtk', 'libgtk3.manifest.in',
-        #           os.path.join(srcroot, 'gtk', 'libgtk3.manifest',
-        #           manifest)
+        manifest = {}
+        manifest['EXE_MANIFEST_ARCHITECTURE'] = '*'
+        process_in(os.path.join(srcroot, 'gtk', 'libgtk3.manifest.in'),
+                   os.path.join(srcroot, 'gtk', 'libgtk3.manifest'),
+                   manifest)
         no_args = False
 
     if no_args is True:
index c86b6b00c76ed3241d8df1dce522ca12d4909db8..d1f24f31e087a95fd8cfafbc2807cac77f17138c 100644 (file)
@@ -64,7 +64,7 @@ $(PythonPath)\python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix
 
 cd $(SolutionDir)
     </GenerateGtkDbusBuiltSources>
-    <GenerateGtkWin32RC>$(PythonPath)\python ..\process-in-win32.py --gtkwin32rc</GenerateGtkWin32RC>
+    <GenerateGtkWin32RC>$(PythonPath)\python ..\process-in-win32.py --gtkwin32rc --gtk3manifest</GenerateGtkWin32RC>
   </PropertyGroup>
   <PropertyGroup>
     <_PropertySheetDisplayName>gtkgensrcsprops</_PropertySheetDisplayName>
index da9351127e2343a3389ec425370ab33cfb7324da..654f4dd1249f5a74b3f42f3ed0825f1459ecf07b 100644 (file)
@@ -39,4 +39,7 @@
     <ClCompile Include="..\..\..\modules\input\imviqr.c"><Filter>Source Files</Filter></ClCompile>
     <ClCompile Include="..\..\..\modules\input\thai-charprop.c"><Filter>Source Files</Filter></ClCompile>
   </ItemGroup>
-</Project>
\ No newline at end of file
+  <ItemGroup>
+    <Manifest Include="..\..\..\gtk\libgtk3.manifest"><Filter>Resource Files</Filter></Manifest>
+  </ItemGroup>
+</Project>
index 80af761ff3e9e6bb80e74f41f8b435f3a1ec3548..dd4213b4d7fabcdbb1e60ea4e48e0bc50c2533c7 100644 (file)
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <Manifest Include="..\..\..\gtk\libgtk3.manifest" />
+  </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
index 24ac945f792c4108600c2025f8cf4d904ce5ff2e..f1833daa84553c2d2aa0fc15823a2d39d35c051d 100644 (file)
@@ -64,6 +64,6 @@ cd $(SolutionDir)&#x0D;&#x0A;
        />
        <UserMacro
                Name="GenerateGtkWin32RC"
-               Value="$(PythonPath)\python ..\process-in-win32.py --gtkwin32rc"
+               Value="$(PythonPath)\python ..\process-in-win32.py --gtkwin32rc --gtk3manifest"
        />
 </VisualStudioPropertySheet>
index 3dc5477c8827a3f422a9c615159f2e6073ff4eab..5e574a22e50810f47f11f9769646adbb51ab8aa1 100644 (file)
                                <Tool Name="VCCustomBuildTool"
                                                Description="Generating GTK+ Win32 Version Resource..."
                                                CommandLine="$(GenerateGtkWin32RC)"
-                                               Outputs="..\..\..\gtk\gtk-win32.rc"
+                                               Outputs="..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest"
                                        />
                                </FileConfiguration>
                                <FileConfiguration Name="Release|Win32">
                                        <Tool Name="VCCustomBuildTool"
                                                Description="Generating GTK+ Win32 Version Resource..."
                                                CommandLine="$(GenerateGtkWin32RC)"
-                                               Outputs="..\..\..\gtk\gtk-win32.rc"
+                                               Outputs="..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest"
                                        />
                                </FileConfiguration>
                                <FileConfiguration Name="Debug|x64">
                                        <Tool Name="VCCustomBuildTool"
                                                Description="Generating GTK+ Win32 Version Resource..."
                                                CommandLine="$(GenerateGtkWin32RC)"
-                                               Outputs="..\..\..\gtk\gtk-win32.rc"
+                                               Outputs="..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest"
                                        />
                                </FileConfiguration>
                                <FileConfiguration Name="Release|x64">
                                        <Tool Name="VCCustomBuildTool"
                                                Description="Generating GTK+ Win32 Version Resource..."
                                                CommandLine="$(GenerateGtkWin32RC)"
-                                               Outputs="..\..\..\gtk\gtk-win32.rc"
+                                               Outputs="..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest"
                                        />
                                </FileConfiguration>
                        </File>
                        <File RelativePath="..\..\..\gtk\gtk-win32.rc" />
+                       <File RelativePath="..\..\..\gtk\libgtk3.manifest"/>
                </Filter>
                <Filter
                        Name="Source Files"